﻿using MauiBuilder.Services;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MauiBuilder.Platforms.Windows
{
    public class AppRestartService : IAppRestartService
    {
        public void RestartApp()
        {
            // Windows 平台重启
            Microsoft.UI.Xaml.Application.Current.Exit();
            System.Diagnostics.Process.Start(Environment.ProcessPath);
        }

        public async Task RestartAppAsync()
        {
            RestartApp();
            await Task.CompletedTask;
        }
    }
}
